#!/bin/bash

#url=www.baidu.com
echo -e "test method that server support \n"
echo "input a url for test"
read url
while [ $url == "" ]
	do echo "need url params, examples: ./xxx.sh www.baidu.com"
done
echo "now url=$url"

methods=(OPTIONS  GET HEAD POST PUT DELETE TRACE CONNECT)
for method in ${methods[*]}
	do echo -e "\n\n $method"
	curl -X $method -Is $url | head -n 1
	sleep 2
done
